//
//  UIImage+HLJImage.m
//  JiaolianClient
//
//  Created by hlj on 15/8/25.
//  Copyright (c) 2015年 NaoDong. All rights reserved.
//

#import "UIImage+HLJImage.h"

@implementation UIImage (HLJImage)

+(UIImage *)imageWithFillColor:(UIColor *)color Size:(CGSize )size
{
    CGRect rect = CGRectMake(0, 0, size.width, size.height);
    UIBezierPath *roundedRect = [UIBezierPath bezierPathWithRect:rect];
    roundedRect.lineWidth = 0;
    UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0.0f);
    [color setFill];
    [roundedRect fill];
    [roundedRect stroke];
    [roundedRect addClip];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return   image;

}

@end
